const afterSole = resolve => require(['@/containers/salesManagement/afterSole'], resolve);
const inSale = resolve => require(['@/containers/salesManagement/inSale'], resolve);
const customerOrder = resolve => require(['@/containers/salesManagement/customerOrder'], resolve);
const customizeOrder = resolve => require(['@/containers/salesManagement/customizeOrder'], resolve);
/* 售中 */
const orderDetailRefund = resolve => require(['@/containers/salesManagement/inSale/orderDetailRefund'], resolve);
const orderDetailChange = resolve => require(['@/containers/salesManagement/inSale/orderDetailChange'], resolve);
const orderOnChange = resolve => require(['@/containers/salesManagement/inSale/orderOnChange'], resolve);
/* 售后 */
const afterOrderDetailRefund = resolve => require(['@/containers/salesManagement/afterSole/afterOrderDetailRefund'], resolve);
const afterOrderDetailChange = resolve => require(['@/containers/salesManagement/afterSole/afterOrderDetailChange'], resolve);
const afterOrderOnChange = resolve => require(['@/containers/salesManagement/afterSole/afterOrderOnChange'], resolve);
/* 定制订单 */
const customizeOrderDetail = resolve => require(['@/containers/salesManagement/customizeOrder/orderDetail'], resolve);
const customizeCreateOrder = resolve => require(['@/containers/salesManagement/customizeOrder/createOrder'], resolve);
/* 现货订单 */
const spotOrder = resolve => require(['@/containers/salesManagement/spotOrder'], resolve);
const spotOrderNew = resolve => require(['@/containers/salesManagement/spotOrder/new'], resolve);
const spotOrderDetail = resolve => require(['@/containers/salesManagement/spotOrder/detail'], resolve);

const priceCheck = resolve => require(['@/containers/salesManagement/priceCheck'], resolve);
const primaryGoods = resolve => require(['@/containers/salesManagement/priceCheck/primaryGoods'], resolve);

//发票管理
const invoiceRecordList = resolve => require(['@/containers/salesManagement/invoice/invoiceRecordList'], resolve);
const invoiceRecordEdit = resolve => require(['@/containers/salesManagement/invoice/invoiceRecordList/edit'], resolve);
const makeInvoiceDetailList = resolve => require(['@/containers/salesManagement/invoice/makeInvoiceDetailList'], resolve);

//店铺现金管理
const shopCashBusiness = resolve => require(['@/containers/salesManagement/shopCashManage/shopCashBusiness'], resolve);
const cashCheck = resolve => require(['@/containers/salesManagement/shopCashManage/cashCheck'], resolve);
//销售达成率分析
const analyzeList = resolve => require(['@/containers/salesManagement/salesYieldRate/analyzeList'], resolve);
const analyzeListDetail = resolve => require(['@/containers/salesManagement/salesYieldRate/analyzeList/detail'], resolve);
/* 礼品积分订单 */
const giftOrderList = resolve => require(['@/containers/salesManagement/giftOrder'], resolve);
const giftOrderDetail = resolve => require(['@/containers/salesManagement/giftOrder/detail'], resolve);

/* 借样订单 */
const sampleOrderList = resolve => require(['@/containers/salesManagement/sampleOrder'], resolve);
const sampleOrderDetail = resolve => require(['@/containers/salesManagement/sampleOrder/detail'], resolve);
const sampleOrderNew = resolve => require(['@/containers/salesManagement/sampleOrder/new'], resolve);
export default [
	//售价管理
	{
	  path: 'priceCheck',
	  name: 'priceCheck',
	  module: 'sales',
	  className: '售价管理',
	  label: '售价查询',
	  component: priceCheck
	},
  {
    path: 'customerOrder',
    name: 'customerOrder',
    module: 'sales',
    className: '客户订单',
    label: '门店发货订单',
    component: customerOrder
  },
	//现货订单 2019.1.22
	 {
	  path: 'spotOrder',
	  name: 'spotOrder',
	  module: 'sales',
	  className: '现货订单管理',
	  label: '现货订单',
	  component: spotOrder,
	},
	{
	  path: 'customizeOrder',
	  name: 'customizeOrder',
	  module: 'sales',
	  className: '定制订单管理',
	  label: '定制订单列表',
	  component: customizeOrder,
	},
	{
	  path: 'inSale',
	  name: 'inSale',
	  module: 'sales',
	  className: '售中订单管理',
	  label: '售中订单列表',
	  component: inSale,
	},
  {
    path: 'afterSole',
    name: 'afterSole',
    module: 'sales',
    className: '售后订单管理',
    label: '售后订单列表',
    component: afterSole
  },
  /* 以下是详情页面 */
  //售中详情-退款
	{
    path: 'orderDetailRefund',
    name: 'orderDetailRefund',
    module: 'sales',
		unlist: true,
    className: '售中订单管理',
    label: '售中订单列表',
		generatedBy: 'inSale',
    component: orderDetailRefund,
  },
  //售中详情-售中变更
  {
    path: 'orderDetailChange',
    name: 'orderDetailChange',
    module: 'sales',
		unlist: true,
    className: '售中订单管理',
    label: '售中订单列表',
		generatedBy: 'inSale',
    component: orderDetailChange,
  },
  //售中详情-发起变更
  {
    path: 'orderOnChange',
    name: 'orderOnChange',
    module: 'sales',
		unlist: true,
    className: '售中订单管理',
    label: '售中订单列表',
		generatedBy: 'inSale',
    component: orderOnChange,
  },
  //售后详情-
  {
    path: 'afterOrderDetailRefund',
    name: 'afterOrderDetailRefund',
    module: 'sales',
		unlist: true,
    className: '售后订单管理',
    label: '售后订单列表',
		generatedBy: 'afterSole',
    component: afterOrderDetailRefund,
  },
  //售中详情-售后变更
  {
    path: 'afterOrderDetailChange',
    name: 'afterOrderDetailChange',
    module: 'sales',
		unlist: true,
    className: '售后订单管理',
    label: '售后订单列表',
		generatedBy: 'afterSole',
    component: afterOrderDetailChange,
  },
	//售中详情-发起变更
	{
	  path: 'afterOrderOnChange',
	  name: 'afterOrderOnChange',
	  module: 'sales',
		unlist: true,
	  className: '售后订单管理',
	  label: '售后订单列表',
		generatedBy: 'afterSole',
	  component: afterOrderOnChange,
	},
	//定制订单-查看详情
	{
	  path: 'customizeOrderDetail',
	  name: 'customizeOrderDetail',
	  module: 'sales',
		unlist: true,
	  className: '定制订单管理',
	  label: '定制订单详情',
		generatedBy: 'customizeOrderDetail',
	  component: customizeOrderDetail,
	},
	//定制订单-新建订单
	{
	  path: 'customizeCreateOrder',
	  name: 'customizeCreateOrder',
	  module: 'sales',
		unlist: true,
	  className: '定制订单管理',
	  label: '新建定制订单',
		generatedBy: 'customizeCreateOrder',
	  component: customizeCreateOrder,
	},
  //现货订单 新建 2019.1.22
   {
    path: 'spotOrderNew',
    name: 'spotOrderNew',
    module: 'sales',
    unlist: true,
    className: '现货订单管理',
    label: '现货订单',
    generatedBy: 'spotOrder',
    component: spotOrderNew,
  },
	//现货订单 详情 2019.1.26
	{
	  path: 'spotOrderDetail',
	  name: 'spotOrderDetail',
	  module: 'sales',
	  unlist: true,
	  className: '现货订单管理',
	  label: '现货订单',
	  generatedBy: 'spotOrder',
	  component: spotOrderDetail,
	},
	{
	  path: 'primaryGoods',
	  name: 'primaryGoods',
	  module: 'sales',
	  className: '售价管理',
	  label: '预选商品清单',
	  component: primaryGoods
	},
	//发票管理
	{
		path: 'invoiceRecordList',
	    name: 'invoiceRecordList',
	    module: 'sales',
	    className: '发票管理',
	    label: '发票记录报表',
	    component: invoiceRecordList
	},
	{
		path: 'invoiceRecordEdit',
	    name: 'invoiceRecordEdit',
	    module: 'sales',
	    className: '发票管理',
		label: '发票记录编辑',
		unlist: true,
		generatedBy: 'invoiceRecordList',
	    component: invoiceRecordEdit
	},
	{
		path: 'makeInvoiceDetailList',
	    name: 'makeInvoiceDetailList',
	    module: 'sales',
	    className: '发票管理',
		label: '开票明细统计',
	    component: makeInvoiceDetailList
	},
	//店铺现金管理
	{
		path: 'shopCashBusiness',
	 	name: 'shopCashBusiness',
	  module: 'sales',
	  className: '店铺现金管理',
		label: '店铺现金营业款',
	  component: shopCashBusiness
	},
	{
		path: 'cashCheck',
	    name: 'cashCheck',
	    module: 'sales',
	    className: '店铺现金管理',
		label: '现金营业款盘点',
	    component: cashCheck
	},
	//销售达成率分析
	{
		path: 'analyzeList',
	 	name: 'analyzeList',
	  module: 'sales',
	  className: '销售达成率分析',
		label: '达成率分析列表',
	  component: analyzeList
	},
	// 全年各渠道目标列表
	{
		path: 'analyzeListDetail',
	 	name: 'analyzeListDetail',
	  module: 'sales',
	  className: '销售达成率分析',
		label: '全年各渠道目标列表',
	  component: analyzeListDetail
	},
    //积分礼品订单
	{
      path: 'giftOrderList',
      name: 'giftOrderList',
      module: 'sales',
      className: '积分礼品订单',
      label: '积分礼品订单',
      component: giftOrderList,
  },
  {
        path: 'giftOrderDetail',
        name: 'giftOrderDetail',
        module: 'sales',
        unlist: true,
        className: '积分礼品订单',
        label: '积分礼品订单',
        generatedBy: 'giftOrderList',
		component: giftOrderDetail,
    },
    //借样订单
    {
        path: 'sampleOrderList',
        name: 'sampleOrderList',
        module: 'sales',
        className: '借样订单',
        label: '借样订单',
        component: sampleOrderList,
    },
    {
        path: 'sampleOrderDetail',
        name: 'sampleOrderDetail',
        module: 'sales',
        unlist: true,
        className: '借样订单',
        label: '借样订单详情',
        generatedBy: 'sampleOrderDetail',
        component: sampleOrderDetail,
    },
    {
        path: 'sampleOrderNew',
        name: 'sampleOrderNew',
        module: 'sales',
        unlist: true,
        className: '借样订单',
        label: '借样订单新建',
        generatedBy: 'sampleOrderNew',
        component: sampleOrderNew,
    },
]
